<?php
namespace app\serverfund\model;

use \app\manage\model\BaseModel;

/**
 * @author:      李颖
 * @DateTime:    2017-12-01 14:26:56
 * @Description: 管理员冻结资金、亚数币、积分时的冻结原因表
 */
class OperateReason extends BaseModel
{
    protected $name = 'operate_reason';
    protected $connection = 'db_config_fund';
    protected $dateFormat = 'Y-m-d H:i:s';
    protected $append = ['status_text','type_text'];
    protected $typeText = ['freeze_fund'=>'冻结资金', 'freeze_currency'=>'冻结亚数币', 'freeze_integral'=>'冻结积分'];

    public function getTypeTextAttr($value, $data)
    {
    	return $this->typeText[$data['type']];
    }

    public function getUserInfoAttr($value)
    {
        return json_decode($value, true);
    }
   
    public function getOppositeInfoAttr($value)
    {
        return json_decode($value, true);
    }


}
